#!/usr/bin/env python3
# -*- coding: utf-8 -*-

Import('env')
env = env.Clone()

# 查找core和sim目录下的所有 .c 文件
core_sources = env.GlobSources('core/src/*.c')
sim_sources = env.GlobSources('sim/src/*.c')
sources = core_sources + sim_sources

env.AddStaticLibrary(
    name='ipc_services',
    sources=sources,
    include_paths=['core/inc', 'sim/inc'],
    export_include_paths=['core/inc', 'sim/inc'],
    cflags=['-g', '-Wall'],
    depends=['ipc_framework'],  # 依赖ipc_framework模块
    static_libs=['ipc_framework', 'utils', 'core', 'posix_osal', 'ipc-server-service-proto']
)

env.AddProtoLibrary(
    name="ipc-server-service-proto",
    proto_files=[
        "sim/src/IpcSimService.proto"
    ],
    proto_type="min",  # 支持 full/lite/min
)